package com.sundi.ecupms.web;


import com.sundi.eccommon.vo.ResultEntity;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

@RestController
@RequestMapping("/upms/user")
public class UserController {


    /**
     * 返回用户信息
     * @return
     */
    @RequestMapping("/info")
    public ResultEntity getUserInfo(Principal member){
        return ResultEntity.ok(member);
    }

}
